{include file='common/head.html'}

<div class="layui-body">
    {if([$list])}
    <div class="layui-tab layui-tab-brief" lay-filter="tab">
        <ul class="layui-tab-title">
            <li class="layui-this" lay-id="t1">订单列表</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form action="{url./admin/Member/index}" method="get" class="layui-form">
                    <div class="layui-form-item nospace">
                        <div class="layui-input-inline">
                            {$pathinfo}
                            <select name="field" lay-verify="required">
                                <option value="username" {if(get('field')=='username')}selected="selected" {/if}>用户名</option>
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <input type="text" name="keyword" value="{$get.keyword}" placeholder="请输入搜索关键字"
                                   class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit>搜索</button>
                            <a class="layui-btn layui-btn-primary" href="{url./admin/Order/index}">清除搜索</a>
                        </div>
                    </div>
                </form>
                <form action="{url./admin/Product/mod}" method="post" id="contentForm" name="contentForm"
                      class="layui-form" onkeydown="if(event.keyCode==13) return false;">
                    <input type="hidden" name="formcheck" value="{$formcheck}">

                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th><input type="checkbox" class="checkbox" lay-ignore id="checkall" title="全选"></th>
                            <th>编号</th>
                            <th>用户名称</th>
                            <th>产品名称</th>
                            <th>订单编号</th>
                            <th>订单数量</th>
                            <th>下单时间</th>
                            <th>添加时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach $product(key,value)}
                        <tr>
                            <td>
                                <input type="checkbox" class="checkbox checkitem" lay-ignore name="list[]"
                                       value="[value->id]">
                                <input type="hidden" name="listall[]" value="[value->id]">
                            </td>
                            <td>[value->id]</td>
                            <td>[value->username]</td>
                            <td>[value->product_name]</td>
                            <td>[value->order_number]</td>
                            <td>[value->order_amount]</td>
                            <td>[value->order_time]</td>
                            <td>[value->add_time]</td>
                            <td>
                                {fun=get_btn_more($value->id)}
                                {fun=get_btn_del($value->id)}
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>


                </form>
                <div class="page">{$pagebar}</div>
            </div>


        </div>
    </div>
    {/if}
    {if([$more])}
    <div class="layui-tab layui-tab-brief" lay-filter="tab">
        <ul class="layui-tab-title">
            <li class="layui-this">订单详情</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <table class="layui-table table-two">

                    <tr>
                        <th width="100">编号</th>
                        <td>{$member->id}</td>
                    </tr>

                    <tr>
                        <th>用户名</th>
                        <td>{$member->username}</td>
                    </tr>
                    <tr>
                        <th>订单编号</th>
                        <td>{$member->order_number}</td>
                    </tr>

                    <tr>
                        <th>产品名</th>
                        <td>{$member->product_name}</td>
                    </tr>

                    <tr>
                        <th>产品图片</th>
                        <td><dl><dt><img src="{SITE_DIR}{$member->product_pic}" style="height:100px;"></dt></dl></td>

                    </tr>
                    <tr>
                        <th>价格</th>
                        <td>{$member->price}</td>
                    </tr>

                    <tr>
                        <th>订单数量</th>
                        <td>{$member->order_amount}</td>
                    </tr>

                    <tr>
                        <th>下单时间</th>
                        <td>{$member->order_time}</td>
                    </tr>

                </table>
                {fun=get_btn_back()}
            </div>
        </div>
    </div>
    {/if}


</div>


{include file='common/foot.html'}
